package 序列化;

import java.io.*;

public class bufferedwriter方法 {
    public static void main(String[]args){
        File file=new File("e:\\ii.txt");
        try {
            BufferedWriter bw=new BufferedWriter(new FileWriter(file));
            bw.write("昆明华信智原");
            bw.newLine();
            bw.write("十二楼");
            bw.close();
            BufferedReader br=new BufferedReader(new FileReader(file));
            String s=br.readLine();
            while (s!=null){
                System.out.println(s);
                s=br.readLine();
            }
            br.close();
            //PrintWriter 方法
            PrintWriter out=new PrintWriter(System.out/*file*/);
            out.print(3.1415926);
            out.write("哈哈哈哈哈");
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
